package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.RobotDrive;


public class DriveTrain {
    RobotDrive drive = new RobotDrive(RobotMap.leftDrive,RobotMap.rightDrive);
    private final double ratio = 0.33; // depends on frequency of continous
    private double currentSpeed;
    double rate;
    
    public void tankDrive(double left, double right){
        drive.tankDrive(left, right);
    }
    public double modifier(double finalSpeed){
        currentSpeed = 0.1;
        rate = finalSpeed/ratio;
        if(currentSpeed<finalSpeed){
            currentSpeed = currentSpeed+rate;
            return currentSpeed;
        }
        else if(currentSpeed>finalSpeed){
            currentSpeed = currentSpeed-rate;
            return currentSpeed;
        }
        else{
            return finalSpeed;
        }
    }

}
